import request from "@/utils/request";

// 获取路由
// export const getRouters = () => {
//   return request({
//     url: '/getRouters',
//     method: 'get'
//   })
// }
// export const getList = (params) => {
//   return request({
//     url: `/system/area/list`,
//     params: params,
//     method: 'get'
//   })
// }
const curpangeName = "serviceGroup";
export const listServiceGroup = (params) => {
  return request({
    url: `/system/${curpangeName}/list`,
    params: params,
    method: "get",
  });
};
export const addList = (params) => {
  return request({
    url: `/system/${curpangeName}/add`,
    data: params,
    method: "post",
  });
};
export const editList = (params) => {
  return request({
    url: `/system/${curpangeName}/edit`,
    data: params,
    method: "post",
  });
};
export const importData = (params) => {
  return request({
    url: `/system/${curpangeName}/importData`,
    params: params,
    method: "post",
  });
};
export const dataExport = (params) => {
  return request({
    url: `/system/${curpangeName}/export`,
    params: params,
    method: "post",
  });
};
export const computerList = (params) => {
  return request({
    url: `/system/computer/list`,
    params: params,
    method: "get",
  });
};
export const arealistTree = (params) => {
  return request({
    url: `/system/${curpangeName}/listTree`,
    params: params,
    method: "get",
  });
};
export const asyc = (params) => {
  return request({
    url: `/system/${curpangeName}/sync`,
    params: params,
    method: "post",
  });
};
export const saveNetWork = (params) => {
  return request({
    url: `/system/${curpangeName}/saveNetWork`,
    data: params,
    method: "post",
  });
};
export const delCurRow = (params) => {
  return request({
    url: `/system/${curpangeName}/delete`,
    params: params,
    method: "post",
  });
};
export const getAreas = (params) => {
  return request({
    url: `/system/area/list`,
    params: params,
    method: "get",
  });
};
